3.119 \(\int \frac{\tan ^{-1}(a x)^2}{c x-i a c x^2} \, dx\)

Optimal. Leaf size=76 \[ \frac{\text{PolyLog}\left (3,-1+\frac{2}{1-i a x}\right )}{2 c}-\frac{i \tan ^{-1}(a x) \text{PolyLog}\left (2,-1+\frac{2}{1-i a x}\right )}{c}+\frac{\log \left (2-\frac{2}{1-i a x}\right ) \tan ^{-1}(a x)^2}{c} \]

[Out]

(ArcTan[a*x]^2*Log[2 - 2/(1 - I*a*x)])/c - (I*ArcTan[a*x]*PolyLog[2, -1 + 2/(1 - I*a*x)])/c + PolyLog[3, -1 +
2/(1 - I*a*x)]/(2*c)

________________________________________________________________________________________

Rubi [A]  time = 0.137644, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 5, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.227, Rules used = {1593, 4868, 4884, 4992, 6610} \[ \frac{\text{PolyLog}\left (3,-1+\frac{2}{1-i a x}\right )}{2 c}-\frac{i \tan ^{-1}(a x) \text{PolyLog}\left (2,-1+\frac{2}{1-i a x}\right )}{c}+\frac{\log \left (2-\frac{2}{1-i a x}\right ) \tan ^{-1}(a x)^2}{c} \]

Antiderivative was successfully verified.

[In]

Int[ArcTan[a*x]^2/(c*x - I*a*c*x^2),x]

[Out]

(ArcTan[a*x]^2*Log[2 - 2/(1 - I*a*x)])/c - (I*ArcTan[a*x]*PolyLog[2, -1 + 2/(1 - I*a*x)])/c + PolyLog[3, -1 +
2/(1 - I*a*x)]/(2*c)

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 4868

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Simp[((a + b*ArcTan[c*x]
)^p*Log[2 - 2/(1 + (e*x)/d)])/d, x] - Dist[(b*c*p)/d, Int[((a + b*ArcTan[c*x])^(p - 1)*Log[2 - 2/(1 + (e*x)/d)
])/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 4992

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(I*(a + b*ArcT
an[c*x])^p*PolyLog[2, 1 - u])/(2*c*d), x] - Dist[(b*p*I)/2, Int[((a + b*ArcTan[c*x])^(p - 1)*PolyLog[2, 1 - u]
)/(d + e*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - (2*I
)/(I + c*x))^2, 0]

Rule 6610

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps

\begin{align*} \int \frac{\tan ^{-1}(a x)^2}{c x-i a c x^2} \, dx &=\int \frac{\tan ^{-1}(a x)^2}{x (c-i a c x)} \, dx\\ &=\frac{\tan ^{-1}(a x)^2 \log \left (2-\frac{2}{1-i a x}\right )}{c}-\frac{(2 a) \int \frac{\tan ^{-1}(a x) \log \left (2-\frac{2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=\frac{\tan ^{-1}(a x)^2 \log \left (2-\frac{2}{1-i a x}\right )}{c}-\frac{i \tan ^{-1}(a x) \text{Li}_2\left (-1+\frac{2}{1-i a x}\right )}{c}+\frac{(i a) \int \frac{\text{Li}_2\left (-1+\frac{2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=\frac{\tan ^{-1}(a x)^2 \log \left (2-\frac{2}{1-i a x}\right )}{c}-\frac{i \tan ^{-1}(a x) \text{Li}_2\left (-1+\frac{2}{1-i a x}\right )}{c}+\frac{\text{Li}_3\left (-1+\frac{2}{1-i a x}\right )}{2 c}\\ \end{align*}

Mathematica [A]  time = 0.253494, size = 82, normalized size = 1.08 \[ \frac{24 i \tan ^{-1}(a x) \text{PolyLog}\left (2,e^{-2 i \tan ^{-1}(a x)}\right )+12 \text{PolyLog}\left (3,e^{-2 i \tan ^{-1}(a x)}\right )+16 i \tan ^{-1}(a x)^3+24 \tan ^{-1}(a x)^2 \log \left (1-e^{-2 i \tan ^{-1}(a x)}\right )-i \pi ^3}{24 c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[ArcTan[a*x]^2/(c*x - I*a*c*x^2),x]

[Out]

((-I)*Pi^3 + (16*I)*ArcTan[a*x]^3 + 24*ArcTan[a*x]^2*Log[1 - E^((-2*I)*ArcTan[a*x])] + (24*I)*ArcTan[a*x]*Poly
Log[2, E^((-2*I)*ArcTan[a*x])] + 12*PolyLog[3, E^((-2*I)*ArcTan[a*x])])/(24*c)

________________________________________________________________________________________

Maple [B]  time = 0.207, size = 183, normalized size = 2.4 \begin{align*}{\frac{ \left ( \arctan \left ( ax \right ) \right ) ^{2}}{c}\ln \left ( 1-{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) }-{\frac{2\,i\arctan \left ( ax \right ) }{c}{\it polylog} \left ( 2,{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) }+2\,{\frac{1}{c}{\it polylog} \left ( 3,{\frac{1+iax}{\sqrt{{a}^{2}{x}^{2}+1}}} \right ) }+{\frac{ \left ( \arctan \left ( ax \right ) \right ) ^{2}}{c}\ln \left ( 1+{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) }-{\frac{2\,i\arctan \left ( ax \right ) }{c}{\it polylog} \left ( 2,-{(1+iax){\frac{1}{\sqrt{{a}^{2}{x}^{2}+1}}}} \right ) }+2\,{\frac{1}{c}{\it polylog} \left ( 3,-{\frac{1+iax}{\sqrt{{a}^{2}{x}^{2}+1}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(a*x)^2/(c*x-I*a*c*x^2),x)

[Out]

1/c*arctan(a*x)^2*ln(1-(1+I*a*x)/(a^2*x^2+1)^(1/2))-2*I/c*arctan(a*x)*polylog(2,(1+I*a*x)/(a^2*x^2+1)^(1/2))+2
/c*polylog(3,(1+I*a*x)/(a^2*x^2+1)^(1/2))+1/c*arctan(a*x)^2*ln(1+(1+I*a*x)/(a^2*x^2+1)^(1/2))-2*I/c*arctan(a*x
)*polylog(2,-(1+I*a*x)/(a^2*x^2+1)^(1/2))+2/c*polylog(3,-(1+I*a*x)/(a^2*x^2+1)^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{8 i \, \arctan \left (a x\right )^{3} - 12 \, \arctan \left (a x\right )^{2} \log \left (a^{2} x^{2} + 1\right ) - 6 i \, \arctan \left (a x\right ) \log \left (a^{2} x^{2} + 1\right )^{2} + 3 \, \log \left (a^{2} x^{2} + 1\right )^{2} \log \left (-a^{2} x^{2}\right ) + 6 i \,{\left (\frac{4 \, \arctan \left (a x\right )^{3}}{c} + a \int \frac{x \log \left (a^{2} x^{2} + 1\right )^{2}}{a^{2} c x^{3} + c x}\,{d x} - 4 \, \int \frac{\arctan \left (a x\right ) \log \left (a^{2} x^{2} + 1\right )}{a^{2} c x^{3} + c x}\,{d x}\right )} c - 6 \, c \int \frac{4 \,{\left (a^{2} x^{2} - 3\right )} \arctan \left (a x\right )^{2}}{a^{2} c x^{3} + c x}\,{d x} + 6 \,{\left (2 \, \arctan \left (a x\right )^{2} +{\rm Li}_2\left (a^{2} x^{2} + 1\right )\right )} \log \left (a^{2} x^{2} + 1\right ) - 6 \,{\rm Li}_{3}(a^{2} x^{2} + 1)}{96 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="maxima")

[Out]

1/96*(8*I*arctan(a*x)^3 - 12*arctan(a*x)^2*log(a^2*x^2 + 1) - 6*I*arctan(a*x)*log(a^2*x^2 + 1)^2 + log(a^2*x^2
 + 1)^3 + 24*I*(arctan(a*x)^3/c + 4*a*integrate(1/16*x*log(a^2*x^2 + 1)^2/(a^2*c*x^3 + c*x), x) - 16*integrate
(1/16*arctan(a*x)*log(a^2*x^2 + 1)/(a^2*c*x^3 + c*x), x))*c + 96*c*integrate(1/16*(4*a*x*arctan(a*x)*log(a^2*x
^2 + 1) + 12*arctan(a*x)^2 + log(a^2*x^2 + 1)^2)/(a^2*c*x^3 + c*x), x))/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{i \, \log \left (-\frac{a x + i}{a x - i}\right )^{2}}{4 \, a c x^{2} + 4 i \, c x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="fricas")

[Out]

integral(-I*log(-(a*x + I)/(a*x - I))^2/(4*a*c*x^2 + 4*I*c*x), x)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(a*x)**2/(c*x-I*a*c*x**2),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\arctan \left (a x\right )^{2}}{-i \, a c x^{2} + c x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="giac")

[Out]

integrate(arctan(a*x)^2/(-I*a*c*x^2 + c*x), x)